home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d3
/
amac36.arc
/
SRQ.BAT
< prev
next >
Wrap
DOS Batch File
|
1991-03-16
|
883b
|
46 lines
@echo off
rem SRQ.BAT for NON-case sensitive search/replace March 7, 1991
rem Quits each file after replacement
rem Requires FGREP.COM
rem Requires INPUT.COM
rem "Enter" without any search or replace text terminates batch file
CLS
INPUT Search Text=/b
IF Errorlevel=1 goto END
SET FGS=%ANS%
ECHO
INPUT Replacement Text=/b
IF Errorlevel=1 goto END
SET FGR=%ANS%
SET >c:$
ECHO
ECHO Searching For Files Containing '%FGS%' To Replace With '%FGR%'...
ECHO ******** NON-CASE SENSITIVE SEARCH/REPLACE ********
ECHO
BREAK on
if not exist SRCH-FG.LST GOTO NEXT1
GOTO NEXT2
:NEXT1
FGREP -f /%FGS%/ *.* >c:$.ql
:NEXT2
if exist SRCH-FG.LST GOTO NEXT3
GOTO NEXT4
:NEXT3
FGREP -f /%FGS%/ @SRCH-FG.LST >c:$.ql
:NEXT4
BREAK off
ECHO
COPY c:$.ql c:!
Q.EXE c:! /ESRCH_q.mac /LSRCH_q.mac
ECHO
:END